<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <div th:include="/layout/head :: head"></div>
</head>
<body>

<div th:include="/layout/navbar :: navbar"></div>


<div class="container" style="margin-top: 50px;">
    <div class="panel panel-default">
        <!-- Default panel contents -->
        <div class="panel-heading">
            新增配置
        </div>
        <div class="panel-body">
            <form id="configCreate" class="form-horizontal" action="/config/create" method="post">
                <div class="form-group">
                    <label class="col-sm-2 control-label">应用编号</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="appId" name="appId"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">邮件</label>
                    <div class="col-sm-10">
                        <textarea class="form-control" cols="20" id="emails" name="emails" placeholder="多个邮箱请使用半角分号隔开"
                                  rows="2"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">短信</label>
                    <div class="col-sm-10">
                        <textarea class="form-control" cols="20" id="mobiles" name="mobiles"
                                  placeholder="多个手机号请使用半角分号隔开" rows="2"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">错误邮件设置</label>
                    <div class="col-sm-10">
                        <table>
                            <tr>
                                <td>
                                    <input id="sendEmailTimeInterval"
                                           name="sendEmailTimeInterval" type="text" class="form-control"
                                           value="0"/>
                                </td>
                                <td>
                                    分钟出现
                                </td>
                                <td>
                                    <input id="sendEmailNumLimit"
                                           name="sendEmailNumLimit" type="text" class="form-control" value="0"/>
                                </td>
                                <td>
                                    次普通错误/严重错误，则发邮件。如想取默认值，则上边信息默认为0。
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">错误短信设置</label>
                    <div class="col-sm-10">
                        <table>
                            <tr>
                                <td>
                                    <input id="sendSmsTimeInterval" name="sendSmsTimeInterval" type="text"
                                           class="form-control" value="0"/>
                                </td>
                                <td>
                                    分钟出现
                                </td>
                                <td>
                                    <input id="sendSmsNumLimit" name="sendSmsNumLimit" type="text"
                                           class="form-control" value="0"/>
                                </td>
                                <td>
                                    次普通错误/严重错误，则发邮件。如想取默认值，则上边信息默认为0。
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">异常白名单</label>
                    <div class="col-sm-10">
                        <textarea class="form-control" cols="20" id="whitelist" name="whitelist"
                                  placeholder="多个异常白名单请使用半角逗号隔开"
                                  rows="2"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-4 col-sm-8">
                        <button type="submit" class="btn btn-default">提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<div th:include="/layout/footer :: footer"></div>
</body>
</html>


<script language="JavaScript" type="application/javascript">
    $(document).ready(function () {
        $('#configCreate').ajaxForm(function (result) {
            eval(result.script);
        });
    });
</script>


